﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RaffleListMaster.aspx.vb"
    Inherits="Backend_RaffleListMaster" %>

<%@ Register Src="Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Arwani Backend Panel</title>
</head>
<body>
    <script type="text/javascript">
        function ConfirmationBox(username) {

            var result = confirm('Are you sure you want to delete ' + username + ' Details');
            if (result) {

                return true;
            }
            else {
                return false;
            }
        }
    </script>
    <form id="form1" runat="server">
    <div>
        <uc1:Menu ID="Menu1" runat="server" />
        <br />
        <div style="text-align: center; font-size: 28px; color: Blue">
            <asp:Label ID="lblHeading" runat="server" Text="Raffle List Master" Style="color: Black;
                font-size: XX-Large; text-decoration: underline;"></asp:Label>
        </div>
        <br />
        <div style="float: right; margin-top: -30px; margin-right: 70px;">
            <%-- <asp:Button ID="btnAdd" runat="server" Text="Add" />--%>
            <asp:Button ID="btnExcel" runat="server" OnClick="btnExcel_Click" Text="Export" />
        </div>
        <div align="center">
            <asp:GridView ID="gvRaffle" runat="server" Width="90%" GridLines="None" CellPadding="4"
                OnRowDataBound="OnRowDataBound" EnableModelValidation="True" ForeColor="#333333"
                AutoGenerateColumns="false" AllowPaging="true" PageSize="20" DataKeyNames="ID"
                HorizontalAlign="Center" CssClass="table">
                <HeaderStyle HorizontalAlign="Left" />
                <PagerSettings Mode="NumericFirstLast" PageButtonCount="4" FirstPageText="First"
                    LastPageText="Last" />
                <Columns>
                    <asp:BoundField DataField="Name" ReadOnly="true" HeaderText="Name " />
                    <asp:TemplateField HeaderText="Start Date">
                        <ItemTemplate>
                            <asp:Label ID="lblSrtDate" runat="server" Text='<%#Eval("Startdate","{0:dd/MM/yyyy}")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="End Date">
                        <ItemTemplate>
                            <asp:Label ID="lblEndDate" runat="server" Text='<%#Eval("Enddate","{0:dd/MM/yyyy}")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="Message">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblMessage" Text='<%#Eval("Message") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Description" ItemStyle-Width="50%">
                        <ItemTemplate>
                            <asp:Label ID="lblDesc" runat="server" Text='<%#Eval("Description")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                   
                    <asp:CheckBoxField DataField="Active" ReadOnly="true" HeaderText="Active" Visible="false" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <a href="EditRaffleListMaster.aspx?id=<%#DataBinder.Eval(Container.DataItem,"ID") %>">
                                Edit</a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%-- <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkdelete" runat="server" OnClick="lnkdelete_Click">Delete</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>--%>
                </Columns>
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <EditRowStyle BackColor="#999999" />
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            </asp:GridView>
        </div>
    </div>
    </form>
</body>
</html>
